//
//  RuntimeMethod.m
//  Object-CPlayGround
//
//  Created by 韩丛旸 on 2017/4/12.
//  Copyright © 2017年 韩丛旸. All rights reserved.
//

#import "RuntimeMethod.h"
#import <objc/runtime.h>


@implementation RuntimeMethod

+ (void)getPropertyList:(Class)myClass {
    unsigned int count = 0;
    Ivar *var = class_copyIvarList(myClass, &count);
    for (int i = 0; i < count; i++) {
        Ivar _var = *(var + i);
        NSLog(@"---%s", ivar_getTypeEncoding(_var));
        NSLog(@"---%s", ivar_getName(_var));
    }
}



@end
